package com.youlu.campus.entity.ca;

import com.youlu.campus.base.base.EntityBase;
import lombok.Data;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @author : [dengbo]
 * @className : CaReceiveConfig
 * @description : [证书领取配置]
 * @createTime : [2022/9/6 16:56]
 */
@Data
@Document(collection = "ca_receive_config")
@CompoundIndexes({
        @CompoundIndex(name = "valid_priority", def = "{'valid':1,'priority':-1}")
})
public class CaReceiveConfig extends EntityBase {
    /**
     * 名称
     */
    private String name;
    /**
     *  链接
     */
    private String linkUrl;
    /**
     * 图片
     */
    private String imageUrl;
    /**
     * 优先级 值越到排序越靠前
     */
    private Integer priority = 0;
    /**
     *  true 显示 false 隐藏
     */
    private Boolean valid;

    /**
     * 活动ID-HPROJ-1616 需求
     */
    private String  activityId;

    @Transient
    /**
     * 领取状态
     * 1、未开始时：订阅领取通知
     * 2、进行中：点我领取
     * 3、结束：领取结束，同时按钮置灰
     */
    private Integer caReceiveStatus =1;

    /**
     * 未开始时：订阅领取通知时
     *  0 未订阅 1订阅
     */
    @Transient
    private Integer subStatus =0;


}
